package com.ruijie.camerax

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.camera.core.*
import com.ruijie.camerax.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity() {

    private lateinit var _binding: ActivityMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        _binding = ActivityMainBinding.inflate(layoutInflater)
        setContentView(_binding.root)
        _binding.apply {
            btnRecorder.setOnClickListener {
                startActivity(Intent(this@MainActivity, VideoActivity::class.java))
            }
            btnTakePicture.setOnClickListener {
                startActivity(Intent(this@MainActivity, TakePictureActivity::class.java))
            }

            btnRecorder2.setOnClickListener {
                startActivity(Intent(this@MainActivity, RecorderActivity::class.java))
            }
        }
    }
}
